/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import pojos.Projects;
import pojos.SourceCode;

/**
 *
 * @author A7med Kotb
 */
@Stateless
public class SourceCodeFacade extends AbstractFacade<SourceCode> {
    @PersistenceContext(unitName = "AquantimaISPU")
    private EntityManager em;

    protected EntityManager getEntityManager() {
        return em;
    }

    public SourceCodeFacade() {
        super(SourceCode.class);
    }

    public List<Projects> getActivityCode() {
        Query query = getEntityManager().createNamedQuery("Projects.findAll");
        return query.getResultList();
    }
    
}
